<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:a4j="http://richfaces.org/a4j"
	xmlns:rich="http://richfaces.ajax4jsf.org/rich" xml:lang="en">
<head>
<title>用户登录时长管理</title>
<meta http-equiv="keywords" content="enter,your,keywords,here" />
<meta http-equiv="description"
	content="A short description of this page." />
<link
	href="#{facesContext.externalContext.requestContextPath}/css/public.css"
	rel="stylesheet" type="text/css" media="screen" />
<link
	href="#{facesContext.externalContext.requestContextPath}/css/main.css"
	rel="stylesheet" type="text/css" media="screen" />
<link
	href="#{facesContext.externalContext.requestContextPath}/css/work.css"
	rel="stylesheet" type="text/css" media="screen" />
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<style type="text/css">
	.rich-message-label{
		color:red;
	}
</style>
</head>
<body style="background-color: #ffffff">
<h:form>
	<div id="right">
	<div id="msgid" class="error pt10p bcf c0 tal" style="display: ">
	<a4j:outputPanel id="msgPanel">
		<center><h:outputText styleClass="cff"
			value="#{LoginLogBB.msg}" /></center>
	</a4j:outputPanel></div>
	<div class="tablelist">
	<table width="100%" border="1" cellpadding="0" cellspacing="0"
		bordercolor="#c3c3c3" style="border-collapse: collapse">
		<tr>
			<td>OFFICE<h:selectOneMenu
				class="style_input" value="#{LoginLogBB.loginLog.office_code}">
				<f:selectItem />
				<f:selectItems value="#{otherParamBB.selectItems_officeInfId}" />
			</h:selectOneMenu></td>
			<td>用 户名<h:inputText type="text"
				value="#{LoginLogBB.loginLog.tp_account}" class="style_input" /></td>
			<td>IP地址<h:inputText type="text"
				value="#{LoginLogBB.loginLog.ip}" class="style_input" /></td>
		</tr>
		<tr>
			<td>登出状态<h:inputText type="text"
				value="#{LoginLogBB.loginLog.logout_flag}" class="style_input" /></td>
			<td>登录日期<rich:calendar 
			datePattern="yyyy-MM-dd" value="#{LoginLogBB.login_time}" /></td>
			<td>登出日期<rich:calendar 
			datePattern="yyyy-MM-dd" value="#{LoginLogBB.logout_time}" /></td>
		</tr>
		<tr>
			<td>MAC地址<h:inputText type="text"
				value="#{LoginLogBB.loginLog.mac}" class="style_input" /></td>
			<td ><h:commandButton class="buttonbg" value="查询" action="#{LoginLogBB.queryLoginLogs}"
				reRender="usertable,msgPanel,cutpage" /></td>
		</tr>
	</table>
	</div>
	<div class="tablelist2"><rich:dataTable rowClasses=",yellow"
		width="100%" id="usertable" value="#{LoginLogBB.loginLogs}" var="table">
		<a4j:keepAlive beanName="LoginLogBB" />
		<f:facet name="header">
			<rich:columnGroup>
				<rich:column>
					<h:outputText value="OFFICE" />
				</rich:column>
				<rich:column>
					<h:outputText value="用户名" />
				</rich:column>
				<rich:column>
					<h:outputText value="IP地址" />
				</rich:column>
				<rich:column>
					<h:outputText value="MAC" />
				</rich:column>
				<rich:column>
					<h:outputText value="登录时间" />
				</rich:column>
				<rich:column>
					<h:outputText value="登出时间" />
				</rich:column>
				<rich:column>
					<h:outputText value="在线时间" />
				</rich:column>
				<rich:column>
					<h:outputText value="登出状态" />
				</rich:column>
			</rich:columnGroup>
		</f:facet>
		<rich:columnGroup>
			<rich:column>
				<h:outputText value="#{table.office_code_value}" />
			</rich:column>
			<rich:column>
				<h:outputText value="#{table.tp_account}" />
			</rich:column>
			<rich:column>
				<h:outputText value="#{table.ip}" />
			</rich:column>
			<rich:column>
				<h:outputText value="#{table.mac}" />
			</rich:column>
			<rich:column>
				<h:outputText value="#{table.login_time}">
					<f:convertDateTime pattern="yyyy-MM-dd hh:mm:ss" timeZone="GMT+8" />
				</h:outputText>
			</rich:column>
			<rich:column>
				<h:outputText value="#{table.logout_time}">
					<f:convertDateTime pattern="yyyy-MM-dd hh:mm:ss" timeZone="GMT+8" />
				</h:outputText>
			</rich:column>
			<rich:column>
				<h:outputText value="#{table.online_time}">
					<f:convertDateTime pattern="yyyy-MM-dd hh:mm:ss" timeZone="GMT+8" />
				</h:outputText>
			</rich:column>
			<rich:column>
				<h:outputText value="#{(table.logout_flag==1)?'正常':''}" />
			</rich:column>
		</rich:columnGroup>
	</rich:dataTable></div>
	<div class="table_grey"><a4j:outputPanel id="cutpage">
		<table cellpadding="0" cellspacing="0" border="0" height="13"
			width="99%">
			<tr>
				<td width="10%" align="left"></td>
				<td width="20%" align="center" valign="middle"
					style="padding-top: 5px; font-size: 12px">总共<strong class="by"><h:outputLabel style="margin-right:5px"
					value="#{LoginLogBB.counttotal}"></h:outputLabel> </strong>条记录</td>
				<td width="40%" align="center" valign="bottom"
					style="font-size: 12px"><a4j:commandButton value="去首页" style="margin-right:30px"
					action="#{LoginLogBB.cutPage}" image="/images/main/a1.gif"
					reRender="usertable,cutpage">
					<f:param name="index" value="1"></f:param>
				</a4j:commandButton> <a4j:commandButton value="去上页" action="#{LoginLogBB.cutPage}" style="margin-right:30px"
				
					image="/images/main/a2.gif" reRender="usertable,cutpage">
					<f:param name="index" value="#{LoginLogBB.index-1}"></f:param>
				</a4j:commandButton> <a4j:commandButton value="去下页" action="#{LoginLogBB.cutPage}" style="margin-right:30px"
					image="/images/main/a3.gif" reRender="usertable,cutpage">
					<f:param name="index" value="#{LoginLogBB.index+1}"></f:param>
				</a4j:commandButton> <a4j:commandButton value="去末页" action="#{LoginLogBB.cutPage}" style="margin-right:30px"
					image="/images/main/a4.gif" reRender="usertable,cutpage">
					<f:param name="index" value="#{LoginLogBB.pagetotal}"></f:param>
				</a4j:commandButton></td>
				<td width="30%" align="left" valign="bottom" style="font-size: 12px">
				<span>第:</span><span class="by"><strong> <h:outputLabel
					value="#{LoginLogBB.index}"></h:outputLabel> </strong> </span>/<h:outputLabel style="margin-right:10px"
					value="#{LoginLogBB.pagetotal}">页</h:outputLabel> 10条/页 <h:selectOneMenu style="margin-left:20px"
					value="#{LoginLogBB.index}" >
					<f:selectItems value="#{LoginLogBB.pages}" />
					<a4j:support event="onchange" action="#{LoginLogBB.cutPage}"
						reRender="usertable,cutpage"></a4j:support>
				</h:selectOneMenu></td>
			</tr>
		</table>
	</a4j:outputPanel></div></div>
</h:form>
<!-- 
<script language="javascript">
	function()
</script>
 -->
</body>
</html>

